#include "CommandPlaceWall.h"
#include "CommandAction.h"

CommandPlaceWall::CommandPlaceWall(CommandAction* action, PlayerModel* player, WallModel* wall) {
	this->action = action;
	this->player = player;
	this->wall = wall;
}

void CommandPlaceWall::doo() {
	action->doPlaceWall(player, *wall);
}

void CommandPlaceWall::undo() {
	action->undoPlaceWall(player, *wall);
}

bool CommandPlaceWall::check() {
	return action->checkPlaceWall(wall);
}

void CommandPlaceWall::validate() {
	action->validatePlaceWall(player, wall);
}

void CommandPlaceWall::cancel() {
	action->cancelPlaceWall(player, *wall);
}